package cn.stylefeng.guns.modular.robot.listener;

import cn.stylefeng.guns.core.shiro.ShiroKit;
import cn.stylefeng.guns.core.shiro.ShiroUser;
import cn.stylefeng.guns.modular.robot.entity.dto.DfImportDto;
import cn.stylefeng.guns.modular.robot.service.DfInfoService;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;

import java.util.ArrayList;
import java.util.List;

public class DfImportListener implements ReadListener<DfImportDto> {

    private DfInfoService dfInfoService;
    private List<DfImportDto> dfImportDtos = new ArrayList<>();

    public DfImportListener(DfInfoService dfInfoService) {
        this.dfInfoService = dfInfoService;
    }

    @Override
    public void invoke(DfImportDto dfImportDto, AnalysisContext analysisContext) {
        dfImportDtos.add(dfImportDto);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

    public List<DfImportDto> getDfImportDtos() {
        return dfImportDtos;
    }
}
